package com.wn.sddfp.common.model.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder   //使用了构建者模式  可以链式编程
@ApiModel("登陆返回信息")
public class LoginVo {

   @ApiModelProperty("用户ID")
   private Long id;

   @ApiModelProperty("用户名")
   private String userName;

   @ApiModelProperty("手机")
   private String phone;
    
   @ApiModelProperty("返回token")
   private String token;

   public static void main(String[] args) {

      //传统写法
      LoginVo loginVo = new LoginVo();
      loginVo.setUserName("admin");
      loginVo.setPhone("18688888888");

      //构建者的模式写
      LoginVo admin = LoginVo.builder().userName("admin").phone("1856623").build();



   }
}